package cn.aigoubuy.service;

import cn.aigoubuy.domain.Order;
import cn.aigoubuy.domain.PageBean;
import cn.aigoubuy.domain.User;

import java.sql.SQLException;

/**
* 订单service接口
*/
public interface OrderService {
    /**
     * 保存订单
     * @param order
     */
    void saveOrder(Order order) throws SQLException;
    /**
     * 通过用户查询订单
     * @param user
     * @param pageNum
     * @param pageSize
     * @return
     * @throws Exception
     */
    PageBean<Order> findByUid(User user, int pageNum, int pageSize) throws Exception;

    /**
     * 通过oid查询详情
     * @param oid
     * @return
     * @throws Exception
     */
    Order findByOid(String oid) throws Exception;

    /**
     * 更新
     * @param order
     * @throws Exception
     */
    void update(Order order) throws Exception;
}